package com.zxq.uart.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Configuration
@Component
public class LockConfig {

    @Value("${lock.timeout}")
    private int timeOut;

    static  LockConfig lockConfig = null;

    public static int getTimeOut() {
        return lockConfig.timeOut;
    }

    @PostConstruct
    public void initConfig() {
          lockConfig = this;
    }

}
